import axios from "axios";

export const get_echarts = (tableName, type, sub) => {
  return new Promise((resolve, resject) => {
    axios
      .get(`/api/hive/table/select`, {
        params: {
          tableName,
          type,
          sub
        },
      })
      .then((res) => {
        if (res.data.code === 200) {
          resolve(res.data);
        }
      })
      .catch((err) => resject(err));
  });
};
